package com.ling.pl.autoproject.definition.component.tree.model;

import com.ling.pl.core.commons.annotation.Dict;
import com.ling.pl.core.commons.annotation.ModelProperty;

import javax.persistence.Column;

public class TreeNode {
    //实体树节点信息
    @Column(name = "TREE_ID", length = 36)
    @ModelProperty(comment = "树id")
    String treeId;

    @Column(name = "NAME", length = 150)
    @ModelProperty(comment = "名称")
    String name;

    @Column(name = "NAME_I18N", length = 150)
    @ModelProperty(comment = "名称")
    String nameI18n;

    @Column(name = "CODE", length = 150)
    @ModelProperty(comment = "节点类型")
    String code;

    @Column(name = "IS_ROOT")
    @ModelProperty(comment = "根节点")
    Boolean isRoot;

    @Column(name = "TREE_NODE_TYPE", length = 150)
    @ModelProperty(comment = "树节点类型")
    @Dict(code = "builder.component.treeNodeType", des = "动态(实体),动态(代码表),静态")
    String treeNodeType;

    @Column(name = "ENTITY_ID", length = 36)
    @ModelProperty(comment = "实体id")
    String entityId;

    @Column(name = "STATIC_NODE_VALUE", length = 150)
    @ModelProperty(comment = "静态节点值")
    String staticNodeValue;

    @Column(name = "IS_WITH_PARENT_NODE")
    @ModelProperty(comment = "附加父节点标识")
    Boolean isWithParentNode;

    @Column(name = "IS_EXPAND")
    @ModelProperty(comment = "默认展开")
    Boolean isExpand;

    @Column(name = "TREE_NODE_ON_SELECT_TYPE", length = 150)
    @ModelProperty(comment = "节点选择处理")
    @Dict(code = "builder.component.treeNodeOnSelectType", des = "页面链接,脚本执行")
    String treeNodeOnSelectType;

    @Column(name = "ON_SELECT_EXE_PARAMS", length = 250)
    @ModelProperty(comment = "执行参数")
    String onSelectExeParams;

    @Column(name = "IS_SELECT_ABLE")
    @ModelProperty(comment = "启用选中")
    Boolean isSelectAble;

    @Column(name = "IS_DEFAULT_SELECTED")
    @ModelProperty(comment = "默认选中")
    Boolean isDefaultSelected;

    @Column(name = "NAVIGATION_VIEW_ID", length = 36)
    @ModelProperty(comment = "导航视图")
    String navigationViewId;

    @Column(name = "NAVIGATION_VIEW_PARAMS", length = 250)
    @ModelProperty(comment = "导航视图参数", des = "n_parent_id_eq=%NODEID%")
    String navigationViewParams;

    @Column(name = "ICON", length = 150)
    @ModelProperty(comment = "静态节点值")
    String icon;

    //动态实体
    //属性列
    @Column(name = "ENTITY_PROPERTY", length = 150)
    @ModelProperty(comment = "标识属性")
    String entityProperty;

    @Column(name = "LABEL_PROPERTY", length = 150)
    @ModelProperty(comment = "文本属性")
    String labelProperty;

    @Column(name = "SORT_PROPERTY", length = 150)
    @ModelProperty(comment = "排序属性")
    String sortProperty;

    @Column(name = "IS_USER_SECURITY")
    @ModelProperty(comment = "启用用户权限控制")
    Boolean isUserSecurity;

    @Column(name = "DATASET_ID", length = 36)
    @ModelProperty(comment = "实体数据集合")
    String datasetId;

    @Column(name = "FILTER_DATASET_ID", length = 36)
    @ModelProperty(comment = "过滤数据集合")
    String filterDatasetId;

    @Column(name = "SORT_DIRECTION", length = 150)
    @ModelProperty(comment = "排序方向")
    @Dict(code = "builder.entity.sortDirection", des = "升序,降序")
    String sortDirection;

    @Column(name = "IS_EXCLUSION_REPEATED")
    @ModelProperty(comment = "排除重复值")
    Boolean isExclusionRepeated;

    @Column(name = "ICON_PROPERTY", length = 150)
    @ModelProperty(comment = "图标属性")
    String iconProperty;

    @Column(name = "CHILD_NUM_PROPERTY", length = 150)
    @ModelProperty(comment = "子节点计数属性")
    String childNumProperty;

    @Column(name = "REMOVE_ENTITY_ACTION_ID", length = 150)
    @ModelProperty(comment = "删除实体行为")
    String removeEntityActionId;

    @Column(name = "REMOVE_ENTITY_OPERATION_ID", length = 150)
    @ModelProperty(comment = "删除实体操作标识")
    String removeEntityOperationId;
}
